package com.ac.scum.log.web.model.pack.controller;

import com.ac.common.core.exception.BaseException;
import com.ac.common.core.result.Result;
import com.ac.scum.log.web.model.pack.dto.PlayerPackageDTO;
import com.ac.scum.log.web.model.pack.service.ServerPackageService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : acfan
 * date : create in 2024/5/28 18:04
 * description : 玩家套餐
 **/
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("pack/player")
public class PlayerPackageController {
    private final ServerPackageService serverPackageService;

    @GetMapping("page/{current}/{size}")
    public Result<Page<PlayerPackageDTO>> page(@PathVariable("current") Long current, @PathVariable("size") Long size) throws BaseException {
        return Result.ok(serverPackageService.page(current, size));
    }
}

